#ifndef _LISTCOMP_H_
#define _LISTCOMP_H_
#include "python3/PythonGrammar30TreeConstants.h"
#include "ast/exprType.h"
#include "ast/comprehensionType.h"
#include "ast/compContextType.h"
#include "AstTypes.h"
class IVisitor;
class ListComp;
typedef QSharedPointer<ListComp> ListCompPtr;

class ListComp: public exprType
{
public:
    explicit ListComp(const exprTypePtr& elt, const ComprehensionTypeList& generators, int ctx, int nodeId=JJTLIST);
    virtual ~ListComp();
    
    
    exprTypePtr elt();
    void setElt(const exprTypePtr& elt);
    
    ComprehensionTypeList generators();
    void setGenerators(const ComprehensionTypeList& generators);
    
    int ctx();
    void setCtx(int ctx);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _elt;
    ComprehensionTypeList _generators;
    int _ctx;
};




#endif